<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--JSTL core tag need to add jstl 1.2 jar to lib-->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head><title>Struts 1 Training Materials</title>
</head>

<body>
<c:set var="root" value="${pageContext.request.contextPath}"/>
<div align="center">
    <center>
        <table border="1" cellspacing="1" width="400">
            <tr>
                <td width="390"><font size="4"><b>JSP Calling</b></font></td>
            </tr>
            <tr>
                <td width="384">
                    <ul>
                        <li>
                            <a href="/pages/test1/test1.jsp">Test 1.1</a>
                            <br>
                            Welcome you will NOT see the test 1 page here because the relative path
                            in invalid.
                        </li>

                        <li>
                            <a href="<%=request.getContextPath()%>/pages/test1/test2.jsp">Test 1.2</a>
                            <br>
                            Welcome you will see the test 2 page here because we have set the
                            application context by calling ("request.getContextPath()") .
                        </li>

                        <li>
                            <a href="${pageContext.request.contextPath}/pages/test1/test3.jsp">Test 1.3</a>
                            <br>
                            Welcome you will see the test 3 page here because we have set the
                            application context by calling ("pageContext.request.contextPath")
                        </li>

                        <li>
                           <a href="${root}/pages/test1/test4.jsp">Test 1.4</a>
                            <br>
                            Welcome you will see the test 4 page here because we have set the
                            application context by using JSTL core tags.
                        </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td>
                    <a href="${root}/index.jsp">HOME</a>
                </td>
            </tr>
        </table>
    </center>
</div>
</body>
</html>